#!/usr/bin/env bash
. $(dirname "$0")/common.sh

set -eux

if [ $# -ge 1 ]; then
	for pkg in "$@"; do
		case $pkg in
			fzf) remove_fzf ;;
			lsd) remove_lsd ;;
			exa) remove_exa ;;
			broot) remove_broot ;;
			bat) remove_bat ;;
			rg) remove_rg ;;
			fd) remove_fd ;;
			delta) remove_delta ;;
			duf) remove_duf ;;
			dust) remove_dust ;;
			dua) remove_dua ;;
			procs) remove_procs ;;
			sd) remove_sd ;;
			choose) remove_choose ;;
			jq) remove_jq ;;
			xh) remove_xh ;;
			curlie) remove_curlie ;;
			btm) remove_btm ;;
			orgalorg) remove_orgalorg ;;
			dive) remove_dive ;;
			micro) remove_micro ;;
			vimrc) remove_vimrc ;;
			*) echo "UNKNOWN PACKAGE: $pkg" ;;
		esac
	done
else
	remove_fzf
	remove_lsd
	remove_exa
	remove_broot
	remove_bat
	remove_rg
	remove_fd
	remove_delta
	remove_duf
	remove_dust
	remove_dua
	remove_procs
	remove_sd
	remove_choose
	remove_jq
	remove_xh
	remove_curlie
	remove_btm
	remove_orgalorg
	remove_dive
	remove_micro
	remove_vimrc

	echo "**********************************************"
	echo "*** Please review:                         ***"
	echo "***   $HOME/.bashrc                        ***"
	echo "***   $HOME/.bash_profile                  ***"
	echo "***   $HOME/.gitconfig                     ***"
	echo "***   $HOME/.vimrc                         ***"
	echo "*** delete lsd, broot, delta related lines ***"
	echo "*** remove unwanted settings in .vimrc     ***"
	echo "**********************************************"
fi
